/*
 * @Author: c
 * @Date: 2024-01-08 22:24:31
 * @LastEditTime: 2024-03-13 13:12:23
 * @LastEditors: c
 * @Description: 
 * @FilePath: \music-web-backend\src\core\music\home\entities\home.entity.ts
 * https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import { BasicEntity } from "src/common/entity/basic.entity";
import { IndexEnum } from "src/common/enums/home.enum";
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity('index')
export class Index extends BasicEntity {
    @PrimaryGeneratedColumn()
    id: number;
    
    @Column({
        name: "type",
        type: "enum",
        enum: IndexEnum,
        nullable: true,
        default: null,
        comment: "主页各模块的类型"
    })
    type: IndexEnum;

    @Column({
        name: "module_name",
        type: "varchar",
        nullable: true,
        default: null,
        comment: "模块的名称"
    })
    moduleName: string;
    
    @Column({
        name: "more_api",
        type: "varchar",
        nullable: true,
        default: null,
        comment: "模块的数据接口"
    })
    moreApi: string;
}
